package com.example.main.mvp.presenter;

import com.example.lib_core.http.BaseObserver;
import com.example.lib_core.mvp.presenter.BasePresenter;
import com.example.main.bean.TravelsBean;
import com.example.main.mvp.contract.MainContract;

import java.util.List;

public class MainPresenter extends BasePresenter<MainContract.Model, MainContract.View> {

    @Inject
    public MainPresenter(MainContract.Model mModel, MainContract.View mView) {
        super(mModel, mView);
    }

    public void getTravelsBean() {
        mModel.requestTravels(mView.currPage(), new BaseObserver<List<TravelsBean>>() {
            @Override
            public void success(List<TravelsBean> bean) {
                mView.initAdapter(bean);
            }
        });
    }
}
